﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MaxLeaf.Common;
using System.Data;
using MaxLeaf.DB;

namespace MaxLeaf.DAL
{
    public class ImInvGroup_2DALBuilder : BaseDALBuilder
    {

        public ImInvGroup_2DALBuilder()
            : base()
        {
            K2KDAL = new K2K.ImInvGroup_2DAL();


        }

        protected override bool ValidCheck(ServerInfo orgServer, ServerInfo destServer, DataRowView drvLog)
        {
            if (CvtFunc.ToInt(drvLog[DEL.LogDEL.LogStatus]) == (int)LogStatus.Delete)
            {
                return true;
            }

            if (orgServer.Type == ServerType.Web && destServer.Type == ServerType.K3)
            {

                if (!destServer.MasterDB)
                {

                    LogManager.Debug(string.Format("  {0} 不分发", destServer));
                    return false;

                }

            }

            return base.ValidCheck(orgServer, destServer, drvLog);
        }


    }
}